/* @(#)GSOperatorDAO.java    
*
* Project: BUS
*
* Modify Information:
* =============================================================================
*   Author       Date       Description
*   ------------ ---------- ---------------------------------------------------
*   simonyi Peng 2006-3-3    建立
*
* Copyright Notice:
* =============================================================================
*    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
*        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
*        Haidian District, Beijing ,100081, China All rights reserved.
*
*    This software is the confidential and proprietary information of
*        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
*        You shall not disclose such Confidential Information and shall use it
*        only in accordance with the terms of the license agreement you entered
*        into with HiTRUST.
*
* Warning:
* =============================================================================
* 
*/
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import com.hitrust.gs.business.GSManufactureProcessor;
import com.hitrust.gs.service.GSBaseBean;

/**
 * @author simonyi
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class GSOrderAuthorizeVO  implements GSBaseBean {

    
    public String orderId;         //订单id
    public String detailId;         //订单明细id
    public String concentricityId;  //集中编码
    public String manufactureId;    //产品编码
    public String manufactureName;  //产品名称
    public String manufactureSpec;
    public String manufactureType;
    public String manufactureBrand;
    public String deptId;
    public String deptName;			//订货单位
    public String isTradeFlatManufacture;//是否网上产品
    public String providerName;     //供应商
    public String providerId;     //供应商
    public double orderCount;			//订货数量
    public String quantUnit;        //单位
    public String unitPrice;        //单价
    public String totalPrice;
    public String deliverDate;		//送货日期
    public String deliverTime;		//送货时间
    public String isTradFlatProvider;
    public ArrayList providerList; //供应商列表GSProviderWithPriceVO
    public String mode;
    public String is_normal;
    public String drawingpiececode;
    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseBean#process(java.sql.ResultSet)
     */
    public Object process(ResultSet aResultSet) throws SQLException {
        GSOrderAuthorizeVO tGSOrderVO = new GSOrderAuthorizeVO();
        GSManufactureProcessor proc = new GSManufactureProcessor();
        
        tGSOrderVO.detailId = aResultSet.getString("P1");
        tGSOrderVO.concentricityId = aResultSet.getString("P2");
        
        try{
            tGSOrderVO.providerList = proc.getProviderInfoByconcentricityid(tGSOrderVO.concentricityId);
        }catch(Exception e){
            tGSOrderVO.providerList = null;
        }
        tGSOrderVO.manufactureId = aResultSet.getString("P3_");    
        tGSOrderVO.manufactureName = aResultSet.getString("P3");
        tGSOrderVO.manufactureSpec = aResultSet.getString("P4");
        tGSOrderVO.manufactureType = aResultSet.getString("P5");
        tGSOrderVO.manufactureBrand = aResultSet.getString("P6");
        tGSOrderVO.deptId  = aResultSet.getString("P7_");
        tGSOrderVO.deptName  = aResultSet.getString("P7");
        tGSOrderVO.isTradeFlatManufacture  = aResultSet.getString("P8");
        tGSOrderVO.providerName = aResultSet.getString("P9");
        tGSOrderVO.providerId = aResultSet.getString("P9_");
        tGSOrderVO.orderCount = aResultSet.getDouble("P10");
        tGSOrderVO.quantUnit = aResultSet.getString("P10_");
        tGSOrderVO.unitPrice = aResultSet.getString("P11");
        tGSOrderVO.totalPrice = aResultSet.getString("P12");
        tGSOrderVO.deliverDate = aResultSet.getString("P13");		
        tGSOrderVO.deliverTime = aResultSet.getString("P14");
        tGSOrderVO.orderId = aResultSet.getString("GS_ORDER_TEMPID");
        tGSOrderVO.isTradFlatProvider = aResultSet.getString("P15");
        tGSOrderVO.mode=aResultSet.getString("P16");
        tGSOrderVO.drawingpiececode=aResultSet.getString("DRAWING_PIECE_CODE");

        int col=-1;
        col=aResultSet.findColumn("IS_NORMAL");
        if(col!=-1){
            tGSOrderVO.is_normal=aResultSet.getString("IS_NORMAL");
        }else{
            tGSOrderVO.is_normal="";
        }
        return tGSOrderVO;
    }


}


